]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/location: Move to quick settings
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 27 Jul 2022 02:43:39 +0000 (04:43 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 2 Aug 2022 16:05:28 +0000 (16:05 +0000)
Another icon-only indicator, so another plain move.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>

js/ui/panel.js
js/ui/status/location.js

index e13ac5cd6d53b845ab24c9f06700968ce56d0ced..4dd8f334112a7c7d453456a666f7772ffa0af638 100644 (file)
@@ -390,13 +390,11 @@ class AggregateMenu extends PanelMenu.Button {
         this._volume = new imports.ui.status.volume.Indicator();
         this._brightness = new imports.ui.status.brightness.Indicator();
         this._system = new imports.ui.status.system.Indicator();
-        this._location = new imports.ui.status.location.Indicator();
         this._nightLight = new imports.ui.status.nightLight.Indicator();
         this._thunderbolt = new imports.ui.status.thunderbolt.Indicator();
 
         this._indicators.add_child(this._remoteAccess);
         this._indicators.add_child(this._thunderbolt);
-        this._indicators.add_child(this._location);
         this._indicators.add_child(this._nightLight);
         if (this._network)
             this._indicators.add_child(this._network);
@@ -417,7 +415,6 @@ class AggregateMenu extends PanelMenu.Button {
             this.menu.addMenuItem(this._bluetooth.menu);
 
         this.menu.addMenuItem(this._remoteAccess.menu);
-        this.menu.addMenuItem(this._location.menu);
         this.menu.addMenuItem(this._rfkill.menu);
         this.menu.addMenuItem(this._power.menu);
         this.menu.addMenuItem(this._powerProfiles.menu);
@@ -425,7 +422,6 @@ class AggregateMenu extends PanelMenu.Button {
         this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
         this.menu.addMenuItem(this._system.menu);
 
-        menuLayout.addSizeChild(this._location.menu.actor);
         menuLayout.addSizeChild(this._rfkill.menu.actor);
         menuLayout.addSizeChild(this._power.menu.actor);
         menuLayout.addSizeChild(this._powerProfiles.menu.actor);
@@ -445,10 +441,13 @@ class QuickSettings extends PanelMenu.Button {
 
         this.setMenu(new QuickSettingsMenu(this, N_QUICK_SETTINGS_COLUMNS));
 
+        this._location = new imports.ui.status.location.Indicator();
         this._unsafeMode = new UnsafeModeIndicator();
 
+        this._indicators.add_child(this._location);
         this._indicators.add_child(this._unsafeMode);
 
+        this._addItems(this._location.quickSettingsItems);
         this._addItems(this._unsafeMode.quickSettingsItems);
     }
 
index 1d4db65ea47fecc257f3909f81512a4597cf4204..116272d157ef40399450ba499d8e9fa95d9c0f7f 100644 (file)
@@ -4,9 +4,9 @@
 const { Clutter, Gio, GLib, GObject, Shell, St } = imports.gi;
 
 const Dialog = imports.ui.dialog;
-const PanelMenu = imports.ui.panelMenu;
 const ModalDialog = imports.ui.modalDialog;
 const PermissionStore = imports.misc.permissionStore;
+const {SystemIndicator} = imports.ui.quickSettings;
 
 const { loadInterfaceXML } = imports.misc.fileUtils;
 
@@ -202,7 +202,7 @@ var GeoclueAgent = GObject.registerClass({
 });
 
 var Indicator = GObject.registerClass(
-class Indicator extends PanelMenu.SystemIndicator {
+class Indicator extends SystemIndicator {
     _init() {
         super._init();